package com.hongdong.flowable.listener;

import lombok.extern.slf4j.Slf4j;
import org.flowable.engine.TaskService;
import org.flowable.engine.delegate.DelegateExecution;
import org.flowable.engine.delegate.ExecutionListener;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

@Component
@Slf4j
public class StartEventListener implements ExecutionListener {

    @Autowired
    private TaskService taskService;

    @Override
    public void notify(DelegateExecution execution) {
        log.info("DelegateExecution.id:{},{}",execution.getEventName(),execution.toString());
        log.info("****** Variables: {}",execution.getVariables());

        if("start".equalsIgnoreCase(execution.getEventName())){

        }

    }
}
